<template>
  <div class="heard-left-box">
    <div class="logo-box">
      <img @click="pathHome" :src="publicUrls + 'door/logoRed.svg'" alt="" v-if="type && !store.homeShow || route.meta.isVip" />

      <img @click="pathHome" :src="publicUrls + 'door/doorLogo.svg'" alt="" v-else />
    </div>
    <div
      class="heard-left-link"
      :class="{
        'heard-left-link-no': type && !store.homeShow || route.meta.isVip,
      }"
    >
      <router-link
        class="left-link-item"
        :class="{
          'heard-left-link-mg': index === 0,
          'heard-left-link-no-item': type && !store.homeShow || route.meta.isVip,
          'heard-link-home-lock': route.meta.titles === '首页' && index === 0,
        }"
        
        v-for="(item, index) in tabList"
        :to="{'path':item.value}" 
        :key="item.id"
      >
        <span>{{ item.name }}</span></router-link
      >
    </div>
  </div>
</template> 

<script setup lang="ts">
import { publicUrls } from '@/utils/minxin';
import { tabList } from './data';
import { useRouter, useRoute } from 'vue-router';
import { useProjectStore } from '@/store';

const store = useProjectStore(); 
 
const props = defineProps({ 
  type: { 
    type: Boolean,   
  }, 
  title: {
    type: String,  
  }, 
});
const router = useRouter(); 
const route = useRoute();
console.log(route.meta.title);
const pathPage = (pathUrl: string) => {
  router.push({ path: pathUrl });
};
const pathHome = () => {
  router.push({ path: '/' });
};
</script> 

<style lang="less" scoped>
@import './ignore.less';
</style>